<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <!--0.不需要传参的情况，就是第四点写个计数器的情况    -->
    <!--1.方法接收参数但是 标签 中不给参数,则系统给点击事件（与click挂钩    -->
    <button @click="btnClick1()">按钮1</button>

    <!--2.手动获取鼠标点击事件，需要把最后一个参数命名为$event    -->
    <button @click="btnClick2(123, $event)">按钮2</button>
</div>
<script src="../js/vue.js"></script>
<script>
    const aaa = new Vue({
        el: "#app",
        data: {
            message: "hello,guys",
        },
        methods: {
            btnClick1(abc){
                console.log(abc);
            },
            btnClick2(abc, event){
                console.log(abc);
                console.log(event);
            }
        }
    })
</script>
</body>
</html>